-- GENERATED SPELL FOR [Dragonflayer Warrior] --


function spell0_23654(pUnit, Event) --@Whirlwind,Self--
pUnit:FullCastSpellOnTarget(48281,pUnit)
pUnit:RegisterEvent('Sorts_23654', 3263, 1)
end

function spell1_23654(pUnit, Event) --@Whirlwind,Self--
pUnit:FullCastSpellOnTarget(48280,pUnit)
pUnit:RegisterEvent('Sorts_23654', 2000, 1)
end

function Sorts_23654(pUnit, Event)
local choix_sorts_23654 = math.random(0, 1)
if choix_sorts_23654 == 0 then
pUnit:RegisterEvent('spell0_23654', 1, 1)
end
if choix_sorts_23654 == 1 then
pUnit:RegisterEvent('spell1_23654', 1, 1)
end
end

function mob23654_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_23654', math.random(1500, 3000), 1)
end

function mob23654_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob23654_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob23654_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(23654, 1, 'mob23654_Action')
RegisterUnitEvent(23654, 2, 'mob23654_Leave')
RegisterUnitEvent(23654, 3, 'mob23654_Kill')
RegisterUnitEvent(23654, 4, 'mob23654_Die')
